package com.yohann.boot.common.annotation;

import org.springframework.cache.annotation.Cacheable;

import java.lang.annotation.*;

/**
 * @author Yeung Wah
 * @since 2022/3/30
 */
@Cacheable(value = "Cache30Minutes",
        keyGenerator = Cache30Minutes.KEY_GENERATOR,
        cacheManager = Cache30Minutes.CACHE_MANAGER)

@Target({ElementType.TYPE, ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
public @interface Cache30Minutes {

    /**
     * key生成策略名称
     */
    String KEY_GENERATOR = "cache30MinutesKeyGenerator";

    /**
     * 缓存策略配置
     */
    String CACHE_MANAGER = "cache30MinutesManager";

}